Reference: stringProc |
stringProc displays a descriptive string for the user in VirtualDub's filter dialog box, so the user can identify the filter's current setting in a quick glance.
Prototype |
void stringProc(const FilterActivation *fa, const FilterFunctions *ff, char *buf); Parameters: fa Pointer to filter activation structure ff Pointer to callback function structure buf Pointer to target buffer Return value: None. Exceptions: No exceptions should be thrown from this function. Requirements: Function may be omitted. No default action is taken.
Remarks |
Unfortunately, the length of the buffer is not passed to the filter. In VirtualDub 1.4d, this filter is a fixed-length 128-byte global buffer, but the beginning of the buffer is pre-filled with the input/output sizes and the name of the filters, so no more than 80 bytes of space is reliably available. Use the _snprintf() and _vsnprintf() functions to make sure you do not overrun the buffer. Like paramProc, this function is called relatively frequently in the user interface, so it shouldn't take too long.
Also, note that limited space is available in VirtualDub's filter list, and that the list does not scroll horizontally, so keep your descriptions short! The string is purely informative, so you do not need to show all of your filter's parameters.
New filters should supply both this function and stringProc2; the only difference is that stringProc2 receives a buffer length.
VirtualDub external filter SDK 1.05 | ©1999-2001 Avery Lee <phaeron@virtualdub.org> |